package cn.jiyun.service.impl;

import cn.jiyun.model.pojo.BalanceChange;
import cn.jiyun.service.IBalanceChangeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.jiyun.mapper.BalanceChangeMapper;
import cn.jiyun.model.query.BalanceChangeQuery;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * 针对表【-BalanceChange】的业务操作的Service实现类
 *
 * @author 
 * @since 2024-12-18
 */
@Service
public class BalanceChangeServiceImpl extends ServiceImpl<BalanceChangeMapper, BalanceChange> implements IBalanceChangeService {

    @Override
    public IPage<BalanceChange> getPageList(BalanceChangeQuery query){
        //1.创建查询条件
        QueryWrapper<BalanceChange> qw = new QueryWrapper<>();
        //ToDo 查询条件

        //2.组件分页数据
        IPage<BalanceChange> page = new Page<>(query.getCurrentPage(), query.getPageSize());
        //3.查询
        baseMapper.selectPage(page,qw);
        //4.返回
        return page;
    }
}
